<script>
import { mapState, mapMutations } from 'vuex';
export default {
	computed: mapState(['hasLogin','uerInfo']),  
	globalData: {},
	onLoad: function(option) {
		console.log(option)
		console.log('App onLoad')
	},
	onLaunch: function(option) {
		uni.getStorage({
			//获得保存在本地的用户信息
			key: 'uerInfo',
			success: res => {
				this.login(res.data);
			}
		});
		this.$options.globalData.query = option.query || {}
		if (option.referrerInfo) {
		  this.$options.globalData.query = Object.assign(this.$options.globalData.query, option.referrerInfo.extraData)
		}
		console.log('App Launch');
		console.log('option',option)
		console.log(this.$options.globalData)
	},
	onShow: function() {
		console.log('App Show');
	},
	onHide: function() {
		console.log('App Hide');
	},
	methods: {
		...mapMutations(['login'])
	}
};
</script>

<style lang="scss">
@import 'all.scss';
/*每个页面公共css */
.hei_100 {
	height: 100rpx;
	/* background-color: #fff; */
	z-index: 10;
}
.hei_210 {
	height: 210rpx;
	background-color: #fff;
	z-index: 10;
}
.padd_210 {
	padding-top: 210rpx;
}
.padd_32 {
	padding: 0 32rpx;
	box-sizing: border-box;
}
.fl {
	float: left;
}
.fr {
	float: right;
}
.clearfix:after {
	/* content: '\20'; */
	display: block;
	height: 0;
	clear: both;
}
.clearfix {
	zoom: 1;
}
</style>
